//
//  UnityAliyunVODUtil.m
//  Unity-iPhone
//
//  Created by tackor on 2019/6/20.
//

#import "UnityAliyunVODUtil.h"
#import "AliyunVODSDKHelper.h"

@implementation UnityAliyunVODUtil

AliyunVODSDKHelper *aliyunVodSDKHelper = nil;


void vodPushVideo(
                  void *accessKeyId,
                  void *accessKeySecret,
                  void *accessKeyToken,

                  void *title,
                  void *desc,
                  void *cateId,
                  void *tags,
                  void *videoPath,
                  void *imagePath
) {
    
    NSString *accessKeyIdStr = [NSString stringWithUTF8String:accessKeyId];
    NSString *accessKeySecretStr = [NSString stringWithUTF8String:accessKeySecret];
    NSString *accessKeyTokenStr = [NSString stringWithUTF8String:accessKeyToken];

    NSString *titleStr = [NSString stringWithUTF8String:title];
    NSString *descStr = [NSString stringWithUTF8String:desc];
    NSString *cateIdStr = [NSString stringWithUTF8String:cateId];
    NSString *tagsStr = [NSString stringWithUTF8String:tags];
    NSString *videoPathStr = [NSString stringWithUTF8String:videoPath];
    NSString *imagePathStr = [NSString stringWithUTF8String:imagePath];
    
    aliyunVodSDKHelper = [[AliyunVODSDKHelper alloc] init];
    //STS方式
    [aliyunVodSDKHelper PushVideoSTSWithAccessKeyId:accessKeyIdStr AccessKeySecret:accessKeySecretStr AccessToken:accessKeyTokenStr Title:titleStr Desc:descStr CateId:cateIdStr Tags:tagsStr VideoPath:videoPathStr ImagePath:imagePathStr];
}

//void vodPullVideo(
//                  void *str1,
//                  void *str2,
//                  void *str3,
//                  void *str4
//) {
//    
//}

@end
